#ifndef WIDGET_H
#define WIDGET_H

#include "bucquage.h"
#include "moduleaccueil.h"
#include <connexionbdd.h>
#include <promsmodel.h>

#include <QDebug>

#include <QWidget>
#include <QtSql>
#include <QColor>
#include <QMessageBox>
#include <QDate>
#include <QListWidgetItem>
#include <QCloseEvent>
#include <QCryptographicHash>
#include <QInputDialog>
#include <QSqlQueryModel>

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT
    
public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();

public slots:
    //widget.cpp
    void OuvrirBucquage(int row);


    //widget_base.cpp
    void ouvrir_base();
    void fermer_base();
    void majTextEdits();

signals:
    void identifier(Pg *p);

protected:
    bool eventFilter(QObject *obj, QEvent *event);
    void focusInEvent(QFocusEvent *);
    
private:
    Ui::Widget *ui;
    QSqlDatabase db;
    PromsModel *modelProms;

    QStringList prefsBlocDroite;
    QStringList prefsBlocGauche;


private slots:

    void on_lineEdit_textChanged(const QString &arg1);
};

#endif // WIDGET_H
